<template>
    <div>
        <h1>---Skills---</h1>
        <div class="progress-box">
            <div class="progress-left">
                <p>前端</p>
                <div class="progress-item" v-for="(item, index) in leftList" :key="index">
                    <div>{{item.name}}</div>
                    <div><my-progress :num="item.num" :color="item.color"></my-progress></div>
                </div>
            </div>
            <div class="progress-right">
                <p>后端</p>
                <div class="progress-item" v-for="(item, index) in rightList" :key="index">
                    <div>{{item.name}}</div>
                    <div><my-progress :num="item.num" :color="item.color"></my-progress></div>
                </div>
            </div>
        </div>
    </div>
</template>
<script>
import MyProgress from '../components/Progress.vue'
export default {
    components:{
        MyProgress,
    },
    data() {
        return {
            leftList:[
                {name:"Html5+CSS3",num:80,color:"#1C89BB"},
                {name:"JavaScript",num:80,color:"#5668A6"},
                {name:"JQuery",num:80,color:"#C22E2E"},
                {name:"less",num:80,color:"#E44C27"},
                {name:"Vue",num:80,color:"#6FB737"},
                {name:"Element ui",num:80,color:"#563D7C"},
                {name:"Uniapp",num:80,color:"#009688"},
                {name:"微信小程序",num:80,color:"#009688"},
                {name:"typeScript",num:40,color:"#00758F"},
                {name:"react",num:20,color:"#1C89BB"},
            ],
            rightList:[
                {name:"SpringBoot",num:60,color:"#1C89BB"},
                {name:"MyBatis",num:80,color:"#5668A6"},
                {name:"MyBatisPlus",num:80,color:"#C22E2E"},
                {name:"Shiro",num:80,color:"#E44C27"},
                {name:"SpringSecurity",num:40,color:"#6FB737"},
                {name:"MySQL",num:80,color:"#563D7C"},
                {name:"MongoDB",num:80,color:"#009688"},
                {name:"SSM",num:80,color:"#51CE50"},
                {name:"JavaWeb",num:80,color:"#00758F"},
                {name:"JPA",num:20,color:"#1C89BB"},
                {name:"QueryDLS",num:20,color:"#5668A6"}
            ],
            colors:['#1C89BB','#5668A6','#C22E2E','#E44C27','#6FB737','#563D7C','#009688','#51CE50','#00758F']
        }
    },
}
</script>
<style scoped>
h1{
    font-size: 0.5rem;
    line-height: 1rem;
}
.progress-box{
    height: calc(100vh - 1rem);
    overflow-y: scroll;
    display: flex;
    justify-content:space-around;
    font-size: 0.18rem;
    padding-right: 0.6rem;
}
.progress-left,.progress-right{
    width: 48%;
}
.progress-left>p,.progress-right>p{
    font-size: 0.3rem;
    margin-bottom: 0.1rem;
}
.progress-item{
    display: flex;
    justify-content: space-between;
    align-items: center;
    width: 100%;
    margin-bottom: 0.3rem;
}
.progress-item>div:first-child{
    font-size: 0.18rem;
    width: 1.5rem;
}
.progress-item>div:last-child{
    width: calc(100% - 1.5rem);
}
@media screen and (max-width:640px ) {
    .progress-box{
        justify-content: start;
        flex-direction: column;
        margin-left: 2%;
        padding: 0 0.6rem 0 0.1rem;
    }
    .progress-left,.progress-right{
        width: 100%;
    }
}
</style>